﻿using System.Data.Entity;

namespace DemoMVC.Models
{
    public class DemoMVCContext : DbContext
    {
        // You can add custom code to this file. Changes will not be overwritten.
        // 
        // If you want Entity Framework to drop and regenerate your database
        // automatically whenever you change your model schema, add the following
        // code to the Application_Start method in your Global.asax file.
        // Note: this will destroy and re-create your database with every model change.
        // 
        // System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChanges<DemoMVC.Models.DemoMVCContext>());

        public DemoMVCContext() : base("name=DemoMVCContext")
        {
        }

        public DbSet<EMP> EMPs { get; set; }
        public DbSet<PIPE_DOCUMENTS_TYPE_LKUP> PipeDocumentsTypeLkups { get; set; } 
    }

    public class EMP
    {
        public int ID { get; set; }
        public string Last_Name { get; set; }
        public string First_Name { get; set; }
        public string Phone1 { get; set; }
        public string Address1 { get; set; }
    }

    public class PIPE_DOCUMENTS_TYPE_LKUP
    {
        public int ID { get; set; }
        public string Descr { get; set; }
        public int Sort_Seq_No { get; set; }
        public string Descr_Abbrev { get; set; }
    }
}
